# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.


pkgname=python-cssutils
_pkgname=cssutils
pkgver=2.11.1
pkgrel=3
pkgdesc='A CSS Cascading Style Sheets library for Python.'
arch=('any')
url='http://cthedot.de/cssutils/'
license=('LGPL3')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('7e38f08c5ff340b82ea39bda207d099b39ce6b88c8ac0d7ac1fb29e7b4ae6d8baa341e0a9b27e6d2285e31266112ec51d1fff9ef3e5a17a4bf55546fb4927845')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

